package
{
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.text.TextField;
	import flash.text.TextFieldType;
	
	public class detalii extends MovieClip
	{
		private var autor:myText = new myText(TextFieldType.DYNAMIC);
		private var profesor:myText = new myText(TextFieldType.DYNAMIC);
		private var scoala:myText = new myText(TextFieldType.DYNAMIC);
		private var limbaj:myText = new myText(TextFieldType.DYNAMIC);
		private var info:myText = new myText(TextFieldType.DYNAMIC);
		
		private var close:myButton = new myButton();
		private var bGround  : backGround = new backGround();
		
		public function detalii()
		{
			addEventListener(Event.ADDED_TO_STAGE,initializare);
			
			close.addEventListener(MouseEvent.CLICK,closed);
		}
		
		private function initializare(e:Event)
		{	
			deseneaza();
			//--------
			close.nume="Close";
			close.culoare=0xff0000;
			close.width-=10;
			close.x=this.width-close.width;
			close.y=0;
			this.addChild(close);
			//--------
			autor.x=20;
			profesor.x=20;
			scoala.x=20;
			limbaj.x=20;
			info.x=40;
			
			autor.y=20;
			profesor.y=autor.y+autor.height+20;
			scoala.y=profesor.y+profesor.height+20;
			limbaj.y=scoala.y+scoala.height+20;
			info.y=limbaj.y+limbaj.height+60;
			
			autor.width=250;
			profesor.width=250;
			scoala.width=250;
			limbaj.width=250;
			info.width=430;
			
			autor.height=20;
			profesor.height=20;
			scoala.height=20;
			limbaj.height=20;
			
			autor.text="Realizat de : Becheanu Oana-Maria";
			profesor.text="Profesor Coordonator : Tomulescu Vasilica";
			scoala.text="Scoala : Colegiul National Ecaterina Teodoroiu";
			limbaj.text="Realizat in : Action Script, IDE : Flash Builder";
			info.text="In acest proiect puteti trasa graficul unei functii cu grad <=2 si veti putea urmarii" +
				"\ncum oscileaza functiile trigonometrice pe cercul trigonometric";
			
			info.height=100;
			info.multiline=true;
			
			this.addChild(autor);
			this.addChild(profesor);
			this.addChild(scoala);
			this.addChild(limbaj);
			this.addChild(info);
		}
		
		private function deseneaza()
		{
			this.addChild(bGround);
		}
		
		private function closed(e:MouseEvent):void
		{
			this.visible = false;
		}
	}
}